package com.leyu.mall.service.goods.impl;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.leyu.mall.common.facade.IGoodsValueaddFacade;
import com.leyu.mall.dao.goods.GoodsValueaddMapper;
import com.leyu.mall.domain.goods.GoodsValueadd;
import com.leyu.mall.service.goods.IGoodsValueaddService;

@Service
@Transactional(rollbackFor = Exception.class)
public class GoodsValueaddServiceImpl implements IGoodsValueaddService,IGoodsValueaddFacade {

	@Resource(name = "goodsValueaddMapper")
	private GoodsValueaddMapper goodsValueaddMapper;

	public GoodsValueadd getGoodsValueaddById(Long entity_id) throws Exception {
		return goodsValueaddMapper.getGoodsValueaddById(entity_id);
	}

	public void save(GoodsValueadd entity) throws Exception {
		if (entity.getValueaddId() == null) {
			goodsValueaddMapper.addGoodsValueadd(entity);

		} else {

			goodsValueaddMapper.updateByPrimaryKey(entity);
		}
	}
	public void deleteGoodsValueadd(Long id) throws Exception {
		goodsValueaddMapper.deleteGoodsValueadd(id);
	}
	public List<GoodsValueadd> getAllGoodsValueadd() throws Exception {
		return goodsValueaddMapper.getAllGoodsValueadd();

	}
	
 
	
}